import { Prop, getModelForClass } from '@typegoose/typegoose';


export class Ecfood {
    @Prop({ require: true, type: Number })
    year
    @Prop({ require: true, type: String })
    quarter
    @Prop({ type: Number, default: 0 })
    count
    @Prop({ require: true, type: String })
    type
}

export const EcfoodModel = getModelForClass(Ecfood, {
    //为模型取名,默认为类的名字+s
    schemaOptions: { collection: 'ecfood' },
})